<template>
  <div id="root">
      <button @click="getUsers">获取用户信息</button>
  </div>
</template>

<script>
  import axios from 'axios'

  export default {
    name:'Vue',
    methods: {
      getUsers(){
        axios.get('http://localhost:8080/vue/user/queryAll').then(
          response=>{
            console.log('success',response.data)
          },
          error=>{
            console.log('success',error.message)
          }
        )
      }
    },
  }
</script>